package com.architecture.core.utils;

import java.util.concurrent.atomic.AtomicLong;

/**
 * Created with IntelliJ IDEA.
 * LoginAction: Administrator
 * Date: 12-5-9
 * Time: 下午3:02
 * To change this template use File | Settings | File Templates.
 */
public final class UniqueUtils {

    private static final AtomicLong atomicLong = new AtomicLong(1);

    /**
     * 用于系统启动时，取得在内存中唯一的值
     * @return  内存中唯一值
     */
    public static final Long getUniqueId(){
         return atomicLong.getAndIncrement();
    }

}
